//不要给我WA WA 叫
//一定AC
//author:Return.
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <set>
#include <map>
#include <cstring>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <iomanip>
#include <climits>
#define int long long 
#define x first 
#define y second 
using namespace std;
const int N = 1e5 + 10;
//int a[N];
void solve()
{
    int n, x;
    cin >> n >> x; 
    vector<int> a(n);
    for (int i = 0; i < n; ++i)
    {
        cin >> a[i];
    }
    sort(a.rbegin(), a.rend()); 
    int min_cnt = 0;
    int sum = 0;

    for (int i = 0; i < n; ++i)
    {
        if (sum >= x)
        {
            break;
        }
        sum += a[i];
        min_cnt++;
    }
    int max_cnt = min(n, x);
    cout << min_cnt << " " << max_cnt << endl;

}
signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr),cout.tie(nullptr);
    int t = 1;
    while(t -- )  solve();
    return 0;
}
